<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>主界面</title>
  </head>
  
  <body>
  	<div>
  		<h2>员工列表</h2>
  		<p>
  			<a href="LoginOutServlet">退出登录</a>&nbsp;&nbsp;&nbsp;&nbsp;
  			<a href="OnlineUserServlet">查看在线人数</a>
  		</p>
  		<p><c:if test="${!empty username }">欢迎${username }登录本系统</c:if></p>
  	</div>
    <table>
    	<tr>
    		<th>编号</th>
    		<th>姓名</th>
    		<th>性别</th>
    		<th>年龄</th>
    		<th>工资</th>
    		<th>消费</th>
    	</tr>
    	<c:forEach items="${list }" var="emp">
    		<tr>
    			<td>${emp.emp_id }</td>
    			<td>${emp.emp_name }</td>
    			<td>${emp.emp_gender }</td>
    			<td>${emp.emp_age }</td>
    			<td>${emp.emp_salary }</td>
    			<td>${emp.emp_consume }</td>
    		</tr>
    	</c:forEach>
    </table>
  </body>
</html>
